package com.example.klaraservice.dao;

import com.example.klaraservice.pojo.Commodity;
import com.example.klaraservice.pojo.OrderItem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author : Glacialerisa
 * @date : 2023/5/30 18:11
 * @desc :
 */
@Mapper
public interface OrderItemMapper {
    /**
     * 获取订单id下的所有订单子项
     * @param id
     * @return
     */
    public List<OrderItem> selectAllByOrdersId(int id);

    /**
     * 添加新的订单子项 返回主键
     * @param orderItem
     * @param ordersId
     * @return
     */
    public boolean addOrderItem(@Param("o") OrderItem orderItem, int ordersId);
}
